window.ArrayUtil = new function() {
	
	this.removeIndex = function(array, from, to) {
		if(!to) to = from;
		var rest = array.slice((to || from) + 1 || array.length);
		array.length = from < 0 ? array.length + from : from;
		return array.push.apply(array, rest);
	}
	
	this.removeElement = function(array, el) {
		var ind = -1;	
		for(var i = 0; i < array.length; i++)
			if(array[i] == el)
				ind = i;
		if(ind == -1) return;		
		this.arrayRemoveIndex(array, ind);
	}
	
	this.combine = function(a, b) {
		var res = [];
		for(var i = 0; i < a.length; i++)
			res[res.length] = a[i];
		for(var i = 0; i < b.length; i++)
			res[res.length] = b[i];
		return res;
	}
}
